<?php
namespace app\api\controller;
use app\model\Banner as BannerModel;
use app\model\Token as TokenModel;
use think\Db;


class Banner extends Base
{   
    protected $noCheckToken = ['index'];
    
    /**
     * @Author   CCH
     * @DateTime 2020-05-23T12:10:10+0800
     * @return   数据列表
     */
    public function index(){
        $map_params = [
            
        ];
        $map = getSearchParam($map_params);
        $map[] = ['status','=',1];
        $map[] = ['location','=',input('location',0)];

        $model = new BannerModel();
        $list = $model->where($map)->order('sort desc,id desc')->select();
        foreach ($list['data'] as $k => $vo) {
            
        }
        return apiResult('2000','获取成功',$list);
    }



}
